package com.ivo.activiti.bpmn.record;

import lombok.Getter;

/**
 * 节点的人员分配类型
 * @author wj
 * @version 1.0
 */
@Getter
public enum AssigneeType {

    Position(0, "岗位"),
    Department(1, "部门"),
    Employee(2, "员工"),
    Param(3, "参数");

    private final int type;

    private final String description;

    AssigneeType(int type, String description) {
        this.type = type;
        this.description = description;
    }

    public static AssigneeType getByType(int type) {
        for (AssigneeType assigneeType : values()) {
            if (assigneeType.getType() == type) {
                return assigneeType;
            }
        }
        return null;
    }
}
